/******************************************************************************/
/* File: messageQueue.h                                                       */
/******************************************************************************/

#ifndef MESSAGE_QUEUE_H
#define MESSAGE_QUEUE_H

#include <queue>
#include "message.h"
#include "thread.h"

class MessageQueue {
public:
    MessageQueue();
    ~MessageQueue();
    
    int PushMessage(Message *pMsg);
    Message* GetMessage();
    
private:
    int Push(Message *pMsg);
    Message* Pop();
    
    MessageQueue(const MessageQueue&);
    MessageQueue& operator = (const MessageQueue&);
    
    std::queue<Message *> mMessageQueue;
    Mutex mMutex;
	Event mEvent;
};

#endif

/******************************************************************************/
/* End File: messageQueue.h                                                   */
/******************************************************************************/